﻿using Abp.AutoMapper;
using FwProject.Authorization.Roles;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Text;

namespace FwProject.Roles.Dto
{
    [AutoMap(typeof(Role))]
    public class RoleEnterDto
    {
        public string Name { get { return $"{DisplayName}"; } }

        [Display(Name = "职务名称")]
        [Required(ErrorMessage = "{0}不能为空")]
        [MaxLength(Role.MaxDisplayNameLength, ErrorMessage = "不能超过{1}个字符")]
        public string DisplayName { get; set; }

        [Display(Name = "描述")]
        [StringLength(Role.MaxDescriptionLength, ErrorMessage = "不能超过{1}个字符")]
        public string Description { get; set; }
    }
}
